package com.zhijian.medical.service;


import com.zhijian.medical.entity.po.DigitalSliceCaseFile;
import com.zhijian.medical.entity.vo.request.DigitalSliceCaseFileSaveOrUpdateVo;
import com.zhijian.medical.entity.vo.request.DigitalSliceCaseFileSearchVo;
import com.zhijian.medical.entity.vo.response.DigitalSliceCaseFileVo;
import com.zhijian.medical.util.Page;

import java.util.List;

/**
 * 数字切片-文件相关 业务处理层
 *
 * @author HCG
 * @version 1.0
 * @date 2022-12-30 21:42:12
 */
public interface DigitalSliceCaseFileService {

    /**
     * 主键查询
     *
     * @param id
     * @return
     */
    DigitalSliceCaseFile selectById(Long id);

    /**
     * 主键查询vo
     *
     * @param id
     * @return
     */
    DigitalSliceCaseFileVo selectVoById(Long id);

    /**
     * 按照主键删除
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 新增
     *
     * @param digitalSliceCaseFile
     * @return
     */
    Long insert(DigitalSliceCaseFile digitalSliceCaseFile);

    /**
     * 新增or修改
     *
     * @param digitalSliceCaseFile
     * @return
     */
    boolean saveOrUpdate(DigitalSliceCaseFile digitalSliceCaseFile);

    /**
     * 新增or修改
     *
     * @param digitalSliceCaseFileSaveOrUpdateVo
     * @return
     */
    boolean saveOrUpdate(DigitalSliceCaseFileSaveOrUpdateVo digitalSliceCaseFileSaveOrUpdateVo);

    /**
     * 更改
     *
     * @param digitalSliceCaseFile
     * @return
     */
    boolean update(DigitalSliceCaseFile digitalSliceCaseFile);

    /**
     * 动态修改
     *
     * @param record
     * @return
     */
    boolean updateByPrimaryKeySelective(DigitalSliceCaseFile record);

    /**
     * 总数
     *
     * @param digitalSliceCaseFileSearchVo
     * @return
     */
    Integer count(DigitalSliceCaseFileSearchVo digitalSliceCaseFileSearchVo);

    /**
     * 列表
     *
     * @param digitalSliceCaseFileSearchVo
     * @return
     */
    List<DigitalSliceCaseFileVo> selectList(DigitalSliceCaseFileSearchVo digitalSliceCaseFileSearchVo);

    /**
     * 分页查询
     *
     * @param digitalSliceCaseFileSearchVo
     * @return
     */
    Page<DigitalSliceCaseFileVo> selectPage(DigitalSliceCaseFileSearchVo digitalSliceCaseFileSearchVo);

    /**
     * 批量新增数据（MyBatis原生foreach方法）
     *
     * @param entities 实例对象列表
     * @return 影响行数
     */
    boolean insertBatch(List<DigitalSliceCaseFile> entities);

    /**
     * 根据类型与病例id进行查找
     *
     * @param type
     * @param caseId
     * @return
     */
    List<DigitalSliceCaseFileVo> selectByTypeAndCaseId(String type, Long caseId);

    /**
     * 根据类型与病例id进行查找
     *
     * @param type
     * @param caseId
     * @param name
     * @return
     */
    DigitalSliceCaseFileVo selectByTypeAndCaseIdAndName(String type, Long caseId, String name);
}